package cn.watson.controller;

import cn.watson.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
/**
 * @Description: user接口
 * @Author: Zhangrui
 * @Version: 1.0
 * @Date:  2022/7/27 23:23
 */
@RestController
public class UserController {

    @Value("${server.port}")
    private Long port;

    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable Long id){

        return User.builder().id(id).name("中村名菜，你访问的服务器ip是：" + port).intro("昭和美人").build();
    }
}
